<template>
  <div>
    <h1 @click="switchClick">动态组件</h1>
    <component :is="switchBoolean ? TheWelcome : AboutView"></component>

  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import AboutView from '../AboutView.vue'
import TheWelcome from '../../components/TheWelcome.vue'

let switchBoolean = ref(false)
const switchClick = () => {
  switchBoolean.value = !switchBoolean.value
}
</script>

<style scoped></style>
